import React,{Component} from 'react';
import Header from './Header';
import {Switch,Route,Redirect,Link} from 'react-router-dom';
import Home from './Home';
import Explore from './Explore';
import Messages from './Messages';
import Notification from './Notification';

import './indexpage.css';

import {Button,Icon} from 'antd';

export default class extends Component{


    render(){
        return (<div style={{height:"100%",overflow:"scroll"}}>
            
            <Header/>
            
            <Link to="/tweet">
                <div className="send-tweet-btn">
                    <Icon type="edit" style={{color:"#fff",fontSize:"16px"}}/>
                    {" "} 推文
                </div>
            </Link>
            
            
            <div style={{overflow:"scroll",height:"100%"}}>
                <Switch>
                    <Route  exact path="/index">
                        <Redirect to="/index/home"/>
                    </Route>
                    <Route path="/index/home"  component={Home}/>
                    <Route path="/index/explore"  component={Explore}/>
                    <Route path="/index/notification"  component={Notification}/>
                    <Route path="/index/messages"  component={Messages}/>
                </Switch>
            </div>


            
            </div>)
    }
}